Skip to content

Conversation

@eavanvalkenburg
Copy link
Member

@eavanvalkenburg eavanvalkenburg commented Jan 6, 2026

Motivation and Context

ADR describing the implications of a potential simplification of the get_response method in ChatClients, this would leverage python's type system and a stream=True/False param to steer the users instead of using two separate methods, that already have a lot of overlap.

Related to #3096 - Point 5

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings January 6, 2026 10:50
@moonbox3 moonbox3 added the documentation Improvements or additions to documentation label Jan 6, 2026
@eavanvalkenburg
Copy link
Member Author

CC: @brettcannon @johanste

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR proposes an ADR (Architecture Decision Record) for simplifying Python's chat client API by consolidating the get_response and get_streaming_response methods into a single method with a stream parameter. This would leverage Python's type system and overload patterns to provide better type safety while reducing code duplication.

Key Changes

  • Proposes consolidating two separate methods (get_response and get_streaming_response) into a single method with a stream parameter
  • Analyzes the implications across all usage areas including agents, decorators, middleware, and provider implementations
  • Provides a detailed migration path with backward compatibility considerations

@eavanvalkenburg eavanvalkenburg force-pushed the python_single_get_response branch from f51a20d to b16f403 Compare January 7, 2026 08:16
@eavanvalkenburg eavanvalkenburg force-pushed the python_single_get_response branch from c7465ec to f59fb8c Compare January 8, 2026 15:57
@eavanvalkenburg eavanvalkenburg force-pushed the python_single_get_response branch from 7d0489c to b5b4b2f Compare January 12, 2026 12:57
@eavanvalkenburg eavanvalkenburg force-pushed the python_single_get_response branch from b5b4b2f to 558b1da Compare January 13, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants